package org.truenewx.tnxjee.core.config;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(EncryptPropertyValueTranslatorProperties.class)
public class ConfigBootstrapConfiguration {

    @Bean
    public TranslatePropertySourceLocator replacePropertySourceLocator() {
        return new TranslatePropertySourceLocator();
    }

    @Bean
    public EncryptPropertyValueTranslator encryptPropertyReplacer() {
        return new AesEncryptPropertyValueTranslator();
    }

}
